package com.pf.controller;

import com.pf.service.ImproveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2023/4/18 22:30
 */
@RestController
@RequestMapping("/improve")
public class ImproveController {

    @Autowired
    private ImproveService improveService;

    @GetMapping("/batchInsert")
    public String batchInsert() {
        improveService.batchInsert();
        return "success";
    }

    @GetMapping("/batchUpdate")
    public String batchUpdate() {
        improveService.batchUpdate();
        return "success";
    }

    @GetMapping("/batchUpdateWithCaseWhen")
    public String batchUpdateWithCaseWhen() {
        improveService.batchUpdateWithCaseWhen();
        return "success";
    }

    @GetMapping("/batchInsertOrUpdate")
    public String batchInsertOrUpdate() {
        improveService.batchInsertOrUpdate();
        return "success";
    }
}
